//引入接口
import { goodsListApi } from "@/utils/api";
import { getDetail } from "../../utils/api";

const actions = {
  async getGoodsData({ commit }, playload) {
    const res = await goodsListApi({ count: 2, page: playload.pagenum });
    commit("getGoodsData", { list: res.result });
  },

  async getDetailActions({ commit }, playload) {
    const res = await getDetail({ pid: playload.id });
    // console.log(res)
    commit("getDtailMutations", { detailList: res.result });
  },
};

export default actions;
